//*  ========  jQuery functions for Revived Singles  ========  *//


$(document).ready(function() {

	$('body').supersleight({shim: '/javascript/pngfix/x.gif'});


//*  ====  jQuery Sliding Sign In Panel  ====  *//

	$("#open").click(function(){
		$("div#panel").slideDown("slow");
	});

	$("#close").click(function(){
		$("div#panel").slideUp("slow");
	});		

	$("#toggle a").click(function () {
		$("#toggle a").toggle();
	});


//*  ====  jQuery Accordion  ====  *//

	// Accordion
	//$("#accordion").accordion({
		//header: "h3",
		//autoHeight: false
	//});

	var accordion = $("#accordion");
	var index = $.cookie("accordion");
	var active;
	if (index !== null) {
		active = accordion.find("h3:eq(" + index + ")");
	} else {
		active = 0
	}
	accordion.accordion({
		header: "h3",
		event: "click hoverintent",
		active: active,
		change: function(event, ui) {
			var index = $(this).find("h3").index ( ui.newHeader[0] );
			$.cookie("accordion", index, {
				path: "/"
			});
		},
		autoHeight: false
	});

	$('#dialog_link, ul#icons li').hover(
		function() { $(this).addClass('ui-state-hover'); },
		function() { $(this).removeClass('ui-state-hover'); }
	);

});


//*  ====  jQuery TransFORMS  ====  *//

	$(function() {
		$("form.jqtransform").jqTransform();
	});


//*  ====  jQuery TransFORMS checkall  ====  *//

	//$(function () {
		//$('#chekall').click(function () {
			//$(this).parents('fieldset:eq(0)').find(':checkbox').attr('checked', this.checked);
		//});
	//});

	//$(function () {
		//$('#all').click(function () {
			//$(this).parent().siblings().find(':checkbox').attr('checked', this.checked);
		//});
   //	});


//*  ====  jQuery Kwicks Nav  ====  *//

	$().ready(function() {
		$('#kwicks .kwicks').kwicks({
			max: 142,
			spacing: 0
		});
	});


//*  ====  jQuery Tipsy Tooltips  ====  *//

	$(function() {
		$('#south').tipsy({fade: true, gravity: 's'});
	});


//*  ====  jQuery Textarea Resizer  ====  *//

	$(function() {
		$('textarea.resizable:not(.processed)').TextAreaResizer();
	});
